for (var t = new Date(), a = [], e = [], i = [], s = [ "上午", "中午", "下午", "晚上", "全天" ], n = t.getFullYear(); n <= 2048; n++) a.push(n);

for (var r = 1; r <= 12; r++) e.push(r);

for (var h = 1; h <= 31; h++) i.push(h);

Component({
    properties: {
        innerText: {
            type: String,
            value: "default value"
        }
    },
    data: {
        years: a,
        year: t.getFullYear(),
        months: e,
        month: 1,
        days: i,
        day: 1,
        date: "",
        timepoints: s,
        timepoint: 1,
        value: [ 0, 0, 0, 1 ],
        multiArray: []
    },
    methods: {
        numnberOfDayInMoth: function(t, a) {
            return 2 == a ? t % 4 == 0 && t % 100 != 0 || t % 400 == 0 ? 29 : 28 : 1 == a || 3 == a || 5 == a || 7 == a || 8 == a || 10 == a || 12 == module ? 31 : 30;
        },
        bindMultiPickerChange: function(t) {
            var a = t.detail.value, e = this.data.years[a[0]], i = this.data.months[a[1]], s = this.data.days[a[2]], n = a[3] + 1, r = {
                date: e + "-" + (i = i < 10 ? "0" + i : "" + i) + "-" + (s = s < 10 ? "0" + s : "" + s),
                timepoint: n
            }, h = {};
            this.triggerEvent("myevent", r, h);
        },
        bindMultiPickerColumnChange: function(t) {
            if (3 == t.detail.column) this.setData({
                timepoint: t.detail.value + 1
            }); else if (2 == t.detail.column) this.setData({
                day: t.detail.value + 1
            }); else {
                var a = this.data.year, e = this.data.month;
                0 == t.detail.column ? a = this.data.years[t.detail.value] : 1 == t.detail.column && (e = this.data.months[t.detail.value]);
                var i = 0, s = [];
                i = this.numnberOfDayInMoth(a, e);
                for (var n = 1; n <= i; n++) s.push(n);
                var r = [ this.data.years, this.data.months, s, this.data.timepoints ];
                this.setData({
                    year: a,
                    month: e,
                    multiArray: r
                });
            }
        }
    },
    attached: function() {
        for (var a = t.getFullYear(), e = t.getMonth(), i = [ 0, e, t.getDate() - 1, 1 ], s = this.numnberOfDayInMoth(a, e), n = [], r = 1; r <= s; r++) n.push(r);
        var h = [ this.data.years, this.data.months, this.data.days, this.data.timepoints ];
        this.setData({
            value: i,
            multiArray: h
        });
    }
});